//
// Created by konglinglong on 2020/9/14.
//

#ifndef O5G_SRC_O5GRAN_L2_SRC_MSCH_INCLUDE_MSCHDEF_H
#define O5G_SRC_O5GRAN_L2_SRC_MSCH_INCLUDE_MSCHDEF_H

#include "../../common/commDef.h"

#define RAN_L2_SCH_ADV  2

#define RAN_UL_SCH_RSLT_NUM_PER_SLOT_MAX  (128)
#define RAN_DL_SCH_RSLT_NUM_PER_SLOT_MAX  (128)

typedef struct RanMschUeInst
{
    uint32_t inUse;
    uint32_t ueId;

    uint32_t nbIdx;
    uint32_t cellIdx;
    uint32_t ueIdx;

} S_RanMschUeInst;

typedef struct RanMschCellInst
{
    uint32_t inUse;
    uint32_t cellId;

    uint32_t nbIdx;
    uint32_t cellIdx;

    pthread_t tid;

    uint32_t ueNum;
    S_RanMschUeInst ueInst[RAN_UE_NUM_MAX];
} S_RanMschCellInst;

typedef struct RanMschNbInst
{
    uint32_t inUse;
    uint32_t nbId;

    uint32_t nbIdx;

    uint32_t cellNum;
    S_RanMschCellInst cellInst[RAN_CELL_NUM_MAX];
} S_RanMschNbInst;

typedef struct RanMschContext
{
    E_AppType appType;
    pthread_t tid;
    S_OsSelect selector;
    S_Poller *poller;
    uint32_t nbNum;
    S_RanMschNbInst nbInst[RAN_NODEB_NUM_MAX];
} S_RanMschContext;

extern S_RanMschContext *gpRanMschContext;

#endif //O5G_SRC_O5GRAN_L2_SRC_MSCH_INCLUDE_MSCHDEF_H
